package com.zmj.biz.impl;

import com.zmj.biz.UserService;
import com.zmj.entity.User;
import com.zmj.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    public User checkName(String name) {
       return userMapper.checkName(name);
    }

    public User checkEmail(String email) {
        return  userMapper.checkEmail(email);
    }

    public User login(User user) {
        return userMapper.login(user);
    }

    public boolean register(User user) {
        return userMapper.register(user);
    }

    public List<User> getUser() {
        return userMapper.getUser();
    }

    public boolean delUser(int id) {
       return userMapper.delUser(id);
    }

    public boolean updUser(User user) {
        return false;
    }

    public User getOne(String username) {
        return userMapper.getOne(username);
    }
}
